Skip to content

Conversation

@ryanolee
Copy link

@ryanolee ryanolee commented Jun 19, 2025

Question Answer
Tickets IBX-10186
Bug fix? yes
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? ...Possibly?
License GPL-2.0

Warning

This PR does result in UI changes to the admin (Mainly surrounding the rendering of certain sub item counts by overall showing the limitations as given)
Also note the fact that everything in #2124 is still relevant to this PR. Read the description of that PR given it's chages are included in this PR

What

This PR leverages changes made in ezsystems/ezplatform-kernel#413 in order to limit the performance impact of loading sub item counts.

This includes:

  • Limiting EXISTS style queries to "1" instead of scanning the entire table
  • Limiting Sub Item counts in the CMS overall to a configurable value sat under subtree_operations.query_subtree.limit. Everywhere wherre a sub-item count is taken from the database has been updated to respect this new parameter. Always fetching the subtree_operations.query_subtree.limit + 1 and in the event of there being more than the limts worth of items adding a "+" to the end of the displayed value. This might be

How

This PR leverages the changes made in ezsystems/ezplatform-kernel#413 by fetching suitable amount of data when performing CMS fetches.

A default global limit has been set in configuration of 500 items for rendering "subitem" results. This should be enough to allow for CMS users to see all relevant values for the numbers in the sense that 4 -> 5 sub items is likely more important information than 565 -> 566 given this value is configurable this cap can be removed as need be.

For the UDW 'c-finder-leaf--has-children': !!location.childCount, is the only use case for the supplied subquery counts resulting in large amounts of DB overhead verses other given queries

Why

The overhead of these count queries is significant in relation to the effects they have on the CMS. See a side by side view for the same request with and without this PR on a page with many sub items. Doctrine usage drops from 50% of the overall wall time for the CMS to load a request.
image (5)

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@sonarqubecloud
Copy link

@ryanolee
Copy link
Author

Closed based on ibexa/core#600 (review) holding off merge of dependant PR.

@ryanolee ryanolee closed this Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants